// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's
// vendor/assets/javascripts directory can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file. JavaScript code in this file should be added after the last require_* statement.
//
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
// about supported directives.
//
// ----- rails js ------
//= require rails-ujs
//= require jquery
//= require bootstrap-sprockets
//= require turbolinks
//= require tools
//= require cable

// ------ 核心js ------
//= require    core/jquery.slimscroll.min
//= require    core/jquery.scrollLock.min
//= require    core/jquery.appear.min
//= require    core/jquery.countTo.min
//= require    core/jquery.placeholder.min
//= require    core/js.cookie.min
//= require app

// ------ plugin -------
//= require plugins/bootstrap-notify/bootstrap-notify.min
//= require plugins/jquery-validation/jquery.validate.min.js

// -------- js code ------
$(document).on('turbolinks:load', function () {
  // 加载OneUI的功能插件
  oneUI.initHelpers('slick', 'notify');

  // layout中的modal弹框，每次在hide的时候都清空内容，保证点击都会重新加载
  $(".application-modal").on("hidden.bs.modal", function () {
    $(this).removeData("bs.modal");
  });

  // 绑定事件
});